package com.qq.first_project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qq.first_project.entity.User;
import com.qq.first_project.mapper.UserMapper;
import com.qq.first_project.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Qiu
 * @since 2022-03-09
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public IPage<User> pageList(Page<User> page, String username) {
        return userMapper.pageList(page, username);
    }

    @Override
    public User checkUser(String username, String password) {
//        MD5加密处理
//        return userMapper.findByUsernameAndPassword(username, MD5Utils.code(password));
        return userMapper.findByUsernameAndPassword(username, password);

    }

}



